#ifndef CITEMSOURCE_H
#define CITEMSOURCE_H

#include "cobject.h"
namespace cooking {

class CItemSource : public CObject
{
    Q_OBJECT
    Q_ENUMS(ESourceType)
    Q_PROPERTY(int listItemId READ listItemId NOTIFY listItemIdChanged)
    Q_PROPERTY(int sourceId READ sourceId NOTIFY sourceIdChanged)
    Q_PROPERTY(ESourceType sourceType READ sourceType NOTIFY sourceTypeChanged)
public:
    enum ESourceType {
        ECustom, //Custom item
        EMeal, //From meal
        ERecipe, //From recipe
        EIngredient, //From ingredient
        EMealRecipe, //From meal recipe
        ERecipeIngredient //From recipe ingredient
    };
    explicit CItemSource(QObject *parent = 0);

    int listItemId();
    void setListItemId(int listItemId);

    int sourceId();
    void setSourceId(int sourceId);

    ESourceType sourceType();
    void setSourceType(ESourceType sourceType);

signals:
    void listItemIdChanged();
    void sourceIdChanged();
    void sourceTypeChanged();

public slots:

private:
    int m_list_item_id;
    int m_source_id;
    ESourceType m_source_type;
};
} // namespace cooking
#endif // CITEMSOURCE_H
